package com.project.biz;

import com.baomidou.mybatisplus.extension.service.IService;
import com.framework.core.result.BasePage;
import com.project.entity.CmsRecoveryOrder;
import com.project.pojo.dto.AddRecoveryOrderDTO;
import com.project.pojo.dto.HomeRecoveryOrderDTO;
import com.project.pojo.dto.RecoveryOrderDTO;
import com.project.pojo.dto.RecoveryOrderDetailDTO;
import com.project.pojo.model.*;

import java.util.List;

/**
 * @Description: 回收订单业务层接口类
 * @Author: zhuchi
 * @CreateDate: 2020/11/13 21:38
 * @Version: 1.0
 */
public interface CmsRecoveryOrderBiz extends IService<CmsRecoveryOrder> {

    /**
     * 按条件分页查询回收订单
     * @param getRecoveryOrderListModel
     * @return
     */
    BasePage<RecoveryOrderDTO> getRecoveryOrderList(GetRecoveryOrderListModel getRecoveryOrderListModel);

    /**
     * 回收员-获取接单中、已完成、已取消订单
     * @param getReceivedMemberOrderModel
     * @param userId
     * @return
     */
    BasePage<RecoveryOrderDTO> getReceivedMemberOrderList(GetReceivedMemberOrderModel getReceivedMemberOrderModel, Long userId);

    /**
     * 获取回收订单详情
     * @param recoveryOrderId
     * @return
     */
    RecoveryOrderDetailDTO getRecoveryOrderDetail(Long recoveryOrderId);

    /**
     * 垃圾回收下单
     * @param addRecoveryOrderModel
     * @param userId
     * @return
     */
    AddRecoveryOrderDTO addRecoveryOrder(AddRecoveryOrderModel addRecoveryOrderModel, Long userId);

    /**
     * 取消回收订单
     * @param cancalRecoveryOrderModel
     * @param userId
     * @return
     */
    int updateCancalRecoveryOrder(CancalRecoveryOrderModel cancalRecoveryOrderModel, Long userId);

    /**
     * 回收员-获取待接单列表
     * @param getBeReceivedRecoveryOrderListModel
     * @param userId
     * @return
     */
    BasePage<RecoveryOrderDTO> getBeReceivedRecoveryOrderList(GetBeReceivedRecoveryOrderListModel getBeReceivedRecoveryOrderListModel, Long userId);

    /**
     * 获取已过可领取时间,还未被领取的订单,执行系统取消
     * @return
     */
    int updateObsoleteRecoveryOrder();

    /**
     * 回收员接单
     * @param receivingOrderModel
     * @param userId
     * @return
     */
    int updateReceivingOrder(ReceivingOrderModel receivingOrderModel, Long userId);

    /**
     * 回收员确认订单金额
     * @param submitReceiveryOrderModel
     * @param userId
     * @return
     */
    int updateSubmitReceiveryOrder(SubmitReceiveryOrderModel submitReceiveryOrderModel, Long userId);

    /**
     * 评价回收订单
     * @param recoveryMemberEvaModel
     * @param userId
     * @return
     */
    int updateRecoveryMember(RecoveryMemberEvaModel recoveryMemberEvaModel, Long userId);

    /**
     * 移动端获取最新回收订单信息
     * @param pageSize
     * @return
     */
    List<HomeRecoveryOrderDTO> getNewRecoveryOrders(int pageSize);

}
